Filename | (eval 1089)[/usr/share/perl5/Sub/Quote.pm:5] |
Statements | Executed 25 statements in 481µs |
Eval Invoked At | /usr/share/perl5/Sub/Quote.pm line 5 |
Sibling evals | 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 |
Calls | P | F | Exclusive Time |
Inclusive Time |
Subroutine |
---|---|---|---|---|---|
3 | 2 | 2 | 67µs | 1.21ms | new | Method::Generate::Constructor::
1 | 1 | 1 | 16µs | 31µs | BEGIN@4.2910 | Sub::Quote::
1 | 1 | 1 | 8µs | 8µs | BEGIN@10 | Method::Generate::Constructor::
Line | State ments |
Time on line |
Calls | Time in subs |
Code |
---|---|---|---|---|---|
1 | { | ||||
2 | 2 | 2µs | my $_QUOTED = ${$_[1]->{"\$_QUOTED"}}; | ||
3 | 1 | 200ns | my $_UNQUOTED = ${$_[1]->{"\$_UNQUOTED"}}; | ||
4 | 2 | 112µs | 2 | 46µs | # spent 31µs (16+15) within Sub::Quote::BEGIN@4.2910 which was called:
# once (16µs+15µs) by Sub::Quote::_clean_eval at line 4 # spent 31µs making 1 call to Sub::Quote::BEGIN@4.2910
# spent 15µs making 1 call to warnings::unimport |
5 | # spent 1.21ms (67µs+1.14) within Method::Generate::Constructor::new which was called 3 times, avg 402µs/call:
# 2 times (13µs+1.12ms) by Moo::_constructor_maker_for at line 201 of Moo.pm, avg 568µs/call
# once (54µs+18µs) by Moo::_constructor_maker_for at line 56 of Sub/Defer.pm | ||||
6 | $_QUOTED if 0; | ||||
7 | 1 | 0s | $_UNQUOTED if 0; | ||
8 | # BEGIN quote_sub PRELUDE | ||||
9 | package Method::Generate::Constructor; | ||||
10 | # spent 8µs within Method::Generate::Constructor::BEGIN@10 which was called:
# once (8µs+0s) by Sub::Quote::_clean_eval at line 15 | ||||
11 | 1 | 1µs | $^H = "2018"; | ||
12 | 1 | 600ns | ${^WARNING_BITS} = "\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377\377"; | ||
13 | 1 | 10µs | %^H = ( | ||
14 | ); | ||||
15 | 1 | 294µs | 1 | 8µs | } # spent 8µs making 1 call to Method::Generate::Constructor::BEGIN@10 |
16 | # END quote_sub PRELUDE | ||||
17 | 1 | 600ns | my $class = shift; | ||
18 | 1 | 200ns | $class = ref($class) if ref($class); | ||
19 | 1 | 200ns | if ($class ne "Method::Generate::Constructor") { | ||
20 | if ($Moo::MAKERS{$class}) { | ||||
21 | if ($Moo::MAKERS{$class}{constructor}) { | ||||
22 | return $class->Method::Generate::Constructor::SUPER::new(@_); | ||||
23 | } | ||||
24 | Moo->_constructor_maker_for($class); | ||||
25 | return $class->new(@_); | ||||
26 | } elsif ($INC{"Moose.pm"} and my $meta = Class::MOP::get_metaclass_by_name($class)) { | ||||
27 | return $meta->new_object( | ||||
28 | $class->can("BUILDARGS") ? $class->BUILDARGS(@_) | ||||
29 | : $class->Moo::Object::BUILDARGS(@_) | ||||
30 | ); | ||||
31 | } | ||||
32 | } | ||||
33 | 1 | 100ns | my $args; | ||
34 | 1 | 900ns | if ( scalar @_ == 1 ) { | ||
35 | unless ( defined $_[0] && ref $_[0] eq 'HASH' ) { | ||||
36 | die "Single parameters to new() must be a HASH ref" | ||||
37 | ." data => ". $_[0] ."\n"; | ||||
38 | } | ||||
39 | $args = { %{ $_[0] } }; | ||||
40 | } | ||||
41 | elsif ( @_ % 2 ) { | ||||
42 | die "The new() method for $class expects a hash reference or a" | ||||
43 | . " key/value list. You passed an odd number of arguments\n"; | ||||
44 | } | ||||
45 | else { | ||||
46 | 1 | 2µs | $args = {@_}; | ||
47 | } | ||||
48 | 1 | 33µs | 1 | 14µs | my $new = $class->next::method(@_); # spent 14µs making 1 call to next::method |
49 | 1 | 12µs | if (exists $args->{"accessor_generator"}) { | ||
50 | $new->{"accessor_generator"} = $args->{"accessor_generator"}; | ||||
51 | } | ||||
52 | 1 | 400ns | if (exists $args->{"attribute_specs"}) { | ||
53 | $new->{"attribute_specs"} = $args->{"attribute_specs"}; | ||||
54 | } | ||||
55 | 1 | 200ns | if (exists $args->{"construction_builder"}) { | ||
56 | $new->{"construction_builder"} = $args->{"construction_builder"}; | ||||
57 | } | ||||
58 | 1 | 200ns | if (exists $args->{"construction_string"}) { | ||
59 | $new->{"construction_string"} = $args->{"construction_string"}; | ||||
60 | } | ||||
61 | 1 | 600ns | if (exists $args->{"package"}) { | ||
62 | $new->{"package"} = $args->{"package"}; | ||||
63 | } | ||||
64 | 1 | 400ns | if (exists $args->{"subconstructor_handler"}) { | ||
65 | $new->{"subconstructor_handler"} = $args->{"subconstructor_handler"}; | ||||
66 | } | ||||
67 | 1 | 4µs | return $new; | ||
68 | } | ||||
69 | 1 | 1µs | $$_UNQUOTED = \&Method::Generate::Constructor::new | ||
70 | } | ||||
71 | 1 | 4µs | 1; | ||
72 | |||||
73 | ; |